/*
 * @Author: Zhouhai 497675647@qq.com
 * @Date: 2022-11-16 18:18:59
 * @LastEditors: Zhouhai 497675647@qq.com
 * @LastEditTime: 2022-11-22 13:55:12
 */
import request from '@/utils/request'
import {SysRoleOrgDomain} from '@/type.d/system/roleorg';

// 查询角色与组织关系信息列表
export function listRoleOrg(query: SysRoleOrgDomain) {
  return request('/system/roleorg/list',{
    method: 'get',
    params: query
  })
}

// 查询角色与组织关系信息详细
export function getRoleOrg(roleOrgId: string) {
  return request('/system/roleorg/' + roleOrgId,{
    method: 'get'
  })
}

// 新增角色与组织关系信息
export function addRoleOrg(data: SysRoleOrgDomain[]) {
  return request('/system/roleorg',{
    method: 'post',
    data: data
  })
}

// 修改角色与组织关系信息
export function updateRoleOrg(data: SysRoleOrgDomain) {
  return request('/system/roleorg',{
    method: 'put',
    data: data
  })
}

// 删除角色与组织关系信息
export function delRoleOrg(roleOrgId: string) {
  return request('/system/roleorg/' + roleOrgId,{
    method: 'delete'
  })
}


export function delRoleOrgByRoleId(roleId: string) {
  return request('/system/roleorg/roleId/' + roleId,{
    method: 'delete'
  })
}